﻿@{
    Layout = null;
    var CoinGold = ViewData["CoinGold"] as Pay.DTO.task_dto;


}

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title> 时代云商</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" href="~/Content/css/base.css" />
    <link rel="stylesheet" href="~/Content/css/tuoken.css" />
    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script type="text/javascript" src="~/Content/js/base.js"></script>
    <script src="~/Content/js/layer/1.9.3/layer.js"></script>
    <script type="text/javascript">
        var flag = false;
        function submit() {
            if (flag) return;
            flag = true;
            $("#recive").addClass("on").text("领取中");
            $.ajax({
                //几个参数需要注意一下
                type: "POST",//方法类型
                dataType: "json",//预期服务器返回的数据类型
                url: "/Task/ShiDaiYunShangPost",//url
                data: {},
                success: function (result) {
                    if (result.result_code == 1000) {
                        layer.msg("领取成功");
                        window.location.reload();
                    } else {
                        layer.msg(result.result_msg);
                    }
                    flag = false;
                        $("#recive").removeClass("on").text("我已注册并登录（+@CoinGold.soup_value 马力）");
                },
                error: function () {
                    layer.msg("异常！");
                    flag = false;
                        $("#recive").removeClass("on").text("我已注册并登录（+@CoinGold.soup_value 马力）");
                }
            });
        }
    </script>
</head>
<body>
    <div class="aboutwhite">
        <div class="refuelcard">
            <div class="refulcard_explain">
                <div class="impower">
                    <p>注册时代云商账号并登录</p>
                    <p>即可获得3个马力值奖励</p>
                </div>
                <ul>
                    <li><em>1</em><div class="msg">下载时代云商APP</div></li>
                    <li><em>2</em><div class="msg">用当前手机号注册并登录时代云商账号</div></li>
                    <li><em>3</em><div class="msg">完成之后回到拓垦APP内点击“我已注册并登录”按钮，验证成功后获得马力。</div></li>
                </ul>

            </div>
            <p class="refulcard_explainfo">说明：每一个拓垦账号只能领取一次！</p>
        </div>
        @if (CoinGold.is_complete) {
            <div class="impower_pd">
                <div class="impower_task">
                    <p class="succeed"> <i></i> 恭喜你已经完成该任务</p>
                </div>
                <a href="#" class="impower_btn on" style="height:0.8rem;width:77%;margin:0 auto;line-height: 0.8rem">您已经获得过马力值了</a>
            </div>

        } else {
            <div class="impower_pd">
                <div class="impower_task">
                    <p> 该任务必须要下载注册登录时代云商APP</p>
                    <p>并且是使用同一个手机号才能够完成</p>
                </div>

                <a href="javascript:void(0)" onclick="submit()" class="impower_btn" id="recive" style="height:0.8rem;width:77%;margin:0 auto;line-height: 0.8rem">我已注册并登录（+@CoinGold.soup_value 马力）</a>

                <a href="javascript:void(0)" class="link" id="download"  style="margin-top: 1rem">点击下载时代云商</a>

            </div>
        }
    </div>
    <script type="text/javascript">
    
        $(function () {
            var browser = {
                versions: function () {
                    var u = navigator.userAgent, app = navigator.appVersion;
                    return {
                        //移动终端浏览器版本信息
                        trident: u.indexOf('Trident') > -1, //IE内核
                        presto: u.indexOf('Presto') > -1, //opera内核
                        webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
                        gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
                        mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
                        ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
                        android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
                        iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
                        iPad: u.indexOf('iPad') > -1, //是否iPad
                        webApp: u.indexOf('Safari') == -1, //是否web应该程序，没有头部与底部,
                        WeiXin: u.match(/MicroMessenger/i) == "MicroMessenger" //是否为微信客户端
                    };
                }(),
                language: (navigator.browserLanguage || navigator.language).toLowerCase()
            };
            $("#download").click(function () {
                if (browser.versions.ios) {
                    location.href = "https://itunes.apple.com/cn/app/%E6%97%B6%E4%BB%A3%E4%BA%91%E5%95%86/id1281884559?mt=8";
                } else if (browser.versions.android) {
                    location.href = "http://openbox.mobilem.360.cn/index/d/sid/3890666";
                }
            });
        });
      
       
      
    </script>
</body>
</html>